home *** CD-ROM | disk | FTP | other *** search
- Path: camelot.dsccc.com!not-for-mail
- From: kcline@sun152.spd.dsccc.com (Kevin Cline)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 8 Mar 1996 10:57:21 -0600
- Organization: DSC Communications Corporation Switch Products Division
- Message-ID: <4hpoth$6uo@sun152.spd.dsccc.com>
- References: <00001a73+00002504@msn.com> <4h5hgj$vpd@tomquartz.niestu.com> <4h7jskINNnph@anvil.ugrad.cs.ubc.ca> <313EDF38.61C1@lfwc.lockheed.com>
- NNTP-Posting-Host: sun152.spd.dsccc.com
-
- In article <313EDF38.61C1@lfwc.lockheed.com>,
- Ken Garlington <GarlingtonKE@lfwc.lockheed.com> wrote:
- >Kazimir Kylheku wrote:
- >> I bet I could get a Fortran programmer to write Ada code that
- >> looks like Ada but is really Fortran in disguise. :)
- >
- >Except - it would not have the aliasing errors of FORTRAN common blocks,
- >for example.
- >
-
- That is a very old Fortran programmer error, virtually eliminated when the
- INCLUDE statement became widely supported and it was easy to ensure that
- all modules had consistent COMMON block definitions.
-
- The modern Fortran programmer using Ada would put all the data in
- a package named 'GLOBALS'. There would be no aliasing problems, but
- huge problems due to lack of encapsulation.
-
- Of course, in C or C++ the programmer would create a file
- "globals.h" with extern declarations for all the data. A somewhat more
- sophisticated programmer would have a singleton class named Global with
- set and get methods for all the data.
- --
- Kevin Cline
-